// pages/wxPay/wxPay.js
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.wx_payment(options.orderNo)
  },

  // 调用客户端微信支付
  wx_payment(res) {
    var pay = JSON.parse(decodeURIComponent(res));
    console.log(pay);
    wx.requestPayment({
      timeStamp: pay.timeStamp,
      nonceStr: pay.nonceStr,
      package: pay.package,
      signType: pay.signType,
      paySign: pay.paySign,
      success(res) {
        console.log("success:"+res)
        
      },
      fail(res) {
        console.log("fail:"+res)
        
      }
    })
  }
})